package com.zenith.zongheng.demo.controller;

import com.zenith.zongheng.core.result.R;
import com.zenith.zongheng.core.util.StringUtil;
import com.zenith.zongheng.demo.domain.dto.LeaveInfoSaveDTO;
import com.zenith.zongheng.demo.domain.dto.LeaveProcessDTO;
import com.zenith.zongheng.system.domain.dto.RequestIdDto;
import com.zenith.zongheng.system.domain.dto.SysUnitinfoDTO;
import com.zenith.zongheng.system.domain.entity.SysUnitinfo;
import com.zenith.zongheng.system.domain.vo.SysUnitinfoVO;
import com.zenith.zongheng.system.service.SysUnitinfoServiceImpl;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hzp
 * @since 2021-12-29
 */
@RestController
@RequestMapping({"/unitInfo"})
public class UnitController {
    @Autowired
    @Reference
    SysUnitinfoServiceImpl sysUnitinfoService;



    /**
     * 根据部门id获得部门信息 （）
     *
     * @author hzp
     * @since 2021-12-31
     */
    @GetMapping("/getById/{id}")
    public R<Object> getById(@PathVariable Long id) {
        return R.ok(sysUnitinfoService.getById(id));
    }
}
